1. Field of the Invention
This invention relates generally to radio frequency receivers, and more specifically to a correlator used for de-spreading a spread spectrum radio signal.
2. Related Art
Direct sequence spread spectrum (DSSS) is used in many communication systems, such as in the global positioning system (GPS); cellular protocols such as IS-95, wideband code division multiple access (WCDMA) and CDMA2000; and wireless local area network (LAN) and personal area network (PAN) protocols such as IEEE 802.11b (Wi-Fi®) and IEEE 802.15.4 (ZigBee™). The term “DSSS” used herein refers to any digital modulation scheme in which a group of M information bits is mapped at a transmitter to one N-chip codeword of a set of N-chip codewords prior to modulation using, for example, phase modulation, then de-mapped at a receiver from a received N-chip codeword to a group of M information bits during demodulation. Because the N-chip codeword has more chips than there are bits in the associated group of M information bits (i.e., N>M), the mapping and de-mapping are referred to as spreading and de-spreading, respectively.
A radio receiver typically uses a correlator to de-spread a received DSSS signal. The correlator structure is a tapped delay line, or a first-in, first-out buffer, for storing DSSS chips. A known complex correlator implementation is an N-tap correlator, with each tap having an associated tap weight, or coefficient, of C0 through CN−1. Typically, each chip of a received noisy signal is inputted to the delay line. Each chip represents a complex sample I+jQ of a received DSSS signal. The correlator receives noisy samples that are complex in general, but are sometimes real valued. The building block of a complex correlator is a tap weight operation. The tap weight operation is a quadrant rotation (i.e., a multiplication by +1, −1, +j or −j) that is applied at each tap of a correlator for de-spreading a pseudorandom (PN) code of the DSSS signal. The correlator has two adder trees, one for the real part and one for the imaginary part. In most DSSS systems, the correlator coefficients, C0 through CN−1 are binary real (±1) or binary complex (±1, ±j) valued that can also be represented using binary logical (0, 1) values.
Correlator de-spreaders that are used in DSSS receivers require a low frequency error. In complex de-spreading implementations, the correlator output is degraded if the received signal has a frequency offset. For the simple case of no frequency error and no additive receiver noise, an expected value at the output of each tap is a complex vector with magnitude Ec*ejφ, where Ec is the received energy per chip and φ is an arbitrary phase rotation of the received signal. In a simple case with no frequency error, the sum of all N taps is N*Ec*exp(jφ). Expanding this simple case to include a frequency offset for the received signal, the output of each tap has a phase error represented by ejθ(n). For a constant frequency error, the phase error per tap, θ, is a linear function of the tap index:θ(n)=φ+2π*Fe*Tchip*n, for n=0, 1, . . . , N−1  [1]where again φ is an arbitrary phase rotation of the received signal, Tchip is the time separation between taps (chip duration), and Fe is the frequency error or frequency offset. For this case, the output of each tap is Ec*ejθ(n). If φ is set to zero, the phase difference between taps is defined as Δθ=2π*Fe*Tchip. The sum of all N taps is given by the formula:
                              correlator          ⁢                                          ⁢          sum                =                  Ec          ⁢                                          ⁢                      ⅇ                          j              ⁢                                                          ⁢              φ                                ⁢                                    ∑                              n                =                0                                            N                -                1                                      ⁢                          ⅇ                              j                ⁢                                                                  ⁢                Δ                ⁢                                                                  ⁢                Θ                ⁢                                                                  ⁢                n                                                                        [        2        ]            with magnitude
                              correlator          ⁢                                          ⁢          output          ⁢                                          ⁢          magnitude                =                  Ec          ⁢                                                                ∑                                  n                  =                  0                                                  N                  -                  1                                            ⁢                              ⅇ                                  j                  ⁢                                                                          ⁢                  Δ                  ⁢                                                                          ⁢                  Θ                  ⁢                                                                          ⁢                  n                                                                                                    [        3        ]            The summation in equation [3] has a closed form solution given by:
                                                                  ∑                              n                =                0                                            N                -                1                                      ⁢                          ⅇ                              j                ⁢                                                                  ⁢                Δ                ⁢                                                                  ⁢                Θ                ⁢                                                                  ⁢                n                                                              =                                                                        ⅇ                                  j                  ⁢                                                                          ⁢                  Δ                  ⁢                                                                          ⁢                  Θ                  ⁢                                                                          ⁢                  N                                            -              1                                                                                                  ⅇ                                                      j                    ⁢                                                                                  ⁢                    Δ                    ⁢                                                                                  ⁢                    Θ                                    ⁢                                                                                                    -              1                                                                      [        4        ]            Using Euler's identities, this can be easily re-written as
                                                                  ∑                              n                =                0                                            N                -                1                                      ⁢                          ⅇ                              j                ⁢                                                                  ⁢                Δ                ⁢                                                                  ⁢                Θ                ⁢                                                                  ⁢                n                                                              =                              sin            ⁡                          (                                                Δ                  ⁢                                                                          ⁢                  Θ                  ⁢                                                                          ⁢                  N                                2                            )                                            sin            ⁡                          (                                                Δ                  ⁢                                                                          ⁢                  Θ                                2                            )                                                          [        5        ]            which can be substituted into equation [3] to give
                              correlator          ⁢                                          ⁢          output          ⁢                                          ⁢          magnitude                =                  Ec          ⁢                                    sin              ⁡                              (                                                      Δ                    ⁢                                                                                  ⁢                    Θ                    ⁢                                                                                  ⁢                    N                                    2                                )                                                    sin              ⁡                              (                                                      Δ                    ⁢                                                                                  ⁢                    Θ                                    2                                )                                                                        [        6        ]            
When Δθ approaches 0, the correlator output magnitude approaches N*Ec. However, as Δθ increases, the sin(kN)/sin(k) term decreases resulting in a loss in correlator output magnitude. When additive receiver noise is present, the loss in correlator output magnitude equates to a loss of signal-to-noise ratio (SNR) at the correlator output. To limit this loss in SNR, some type of frequency correction is often used prior to the correlator to reduce the frequency error. The frequency correction prior to the correlator is accomplished using any of a variety of known methods depending on the system protocol. Accordingly, a complex correlator structure is typically preceded by a frequency correction stage. The frequency correction stage usually includes a digital oscillator (e−j2π*fe*n) and a complex mixer to correct a frequency offset fe.
There are at least two known methods of performing frequency estimation and correction prior to de-spreading. Most DSSS system protocols include one of a dedicated synchronization (sync) channel that is used to acquire a frequency estimate, and a packet preamble of sufficient duration to allow frequency estimation. Then, using either method, the frequency can be corrected at a frequency correction stage prior to the correlator. The first known method of performing frequency estimation and correction prior to de-spreading, which uses a dedicated sync channel or has sync packets that are independent of the data packet, is used with the CDMA and GSM protocols. These dedicated sync channel/packets are used to estimate the frequency error, sometimes including averaging. The second known method of performing frequency estimation and correction prior to de-spreading, which uses a long preamble during which the receiver has sufficient signal processing time to estimate the frequency error, is used with the 802.11b protocol. In both methods, a frequency correction term is applied to the received data channel/packet before the packet header and payload arrive at the correlator.
The packet structure of the 802.15.4 protocol comprises a preamble of eight (8) symbols followed by a payload of up to 256 symbols. Each symbol comprises four (4) bits. Each bit comprises eight (8) DSSS chips. Each chip has a duration of 16 μsec. The 802.15.4 standard allows for a maximum clock drift of 40 ppm in a transmitter and 40 ppm in a receiver. With the 802.15.4 protocol, frequency error estimation is particularly challenging because of a large frequency error permitted by the protocol (±80 ppm or FreqError/ChipRate=±0.0975), which is random from one received packet to the next, and because of the shortness of the preamble that is available for acquiring chip sync, detecting the preamble and estimating the frequency offset.
A short preamble of the 802.15.4 protocol, combined with low SNR and low inter-symbol interference (ISI), does not provide enough time for a receiver to perform reliable frequency estimation prior to the correlator. Therefore, traditional techniques for frequency estimation and correction do not work well for a receiver receiving signals transmitted according to the 802.15.4 protocol. The low frequency error at the correlator is typically accomplished via a frequency correction operation such as an automatic frequency control (AFC) prior to the de-spreading operation. However, AFC cannot be used with 802.15.4 receivers because the preamble of the protocol is too short. Although the preamble of the 802.15.4 protocol consists of eight (8) symbols, the first four (4) codewords of which are typically distorted during a settling period of an automatic gain control of the receiver; therefore, only the last four symbols are available for AFC, which are an insufficient number of symbols.
Known techniques for frequency correction for 802.15.4 receivers require performing either differentially-coherent detection or some method of frequency correction prior to de-spreading (i.e., prior to the correlator). In some known 802.15.4 integrated circuits, frequency error effects are mitigated using differentially-coherent detection, which comprises passing the original codes through a differential detector prior to the correlator to produce a modified set of de-spreading codes, then using the modified set of de-spreading codes at the correlator. Although the differentially-coherent detection technique tolerates the ±80 ppm frequency error permitted by the 802.15.4 protocol without any frequency correction, it does so at the expense of a reduction in receive sensitivity and a reduction in multipath delay spread tolerance.
Still other known 802.15.4 receivers do not perform frequency correction at all, and, consequently, have poor link performance.
All known correlator structures in spread-spectrum receiver demodulators are used only for the sole purpose of de-spreading.